#ifndef CtaskProc_H
#define CtaskProc_H

#include <QObject>
#include<QtNetwork/QTcpSocket>
#include<QtNetwork/QTcpServer>

class CtaskProc : public QObject
{
    Q_OBJECT
public:
    explicit CtaskProc(QTcpSocket* &Client, QString Ip, quint16 Port, QObject *parent = Q_NULLPTR);
    ~CtaskProc();

    void StartForwardProc();

public slots:
    void Diconnect();
    void RecvClientData();
    void RecvSerData();
    void Connected();
    void ReadError(QAbstractSocket::SocketError);

private:
    QTcpSocket *ForwardClient;
    QTcpSocket *ForwardServer;
    QString ForwardIp;
    quint16 ForwardPort;
};

#endif
